import React from "react"
import {getMov} from "../api/index"
import "../style/index.css"

class Look extends React.Component{
    constructor(){
        super()
        this.state={
            photo:[]
        }
    }
    componentDidMount(){
        let _this= this
        getMov().then(res=>{
            // console.log(res);
           _this.setState({
               photo:res.data.result
           })
            
        })
    }
    Change(){
        
    }
    render(){
        return(
               <div id="app">
                   <div className="in"> <input type="text" defaultValue="陈奕迅" className="ss"/> </div>
                   <ul>
        {this.state.photo.map((item,index)=>
        (<li key={index}>
            <img src={item.picUrl} className="aaa" onChange={this.Change.bind(this)}></img>
            <h1>{item.name}</h1>
            <hr/>
            <p>{item.artistName}</p>
           </li>))}
                   </ul>
               </div>
        )
   }
}
export default Look